$(function () {
    let markId = getUrlString('markid');
    let id = getUrlString('id');
    function addFrd (info){
        var data = {
            'markid':markId,
            'touserid':id,
            'info':info,
        };
        getData('get','/niu/apiv3/weibo_friend.php?method=sendInvitation',data,function (data) {
            console.log(data);
            if (data.resultcode === '0'){
                laymsg('验证发送成功');
                setTimeout(function () {
                    nativeCommand("dancool://activity=reflashfin");
                },2000)

            }
        })
    }
    $('#send').click(function () {
        let info = $('#sendContent').val();
        if (info === ''){
            laymsg('验证信息不能为空');
            return
        }
        addFrd(info)
    })

});